#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <strings.h>
#include <signal.h>
#include <sqlite3.h>
#include <unistd.h>
#include <string.h>
#include <strings.h>
#include <time.h>

#define SERVER_PORT 5001
#define BACKLOG 5
#define DATABASE "dictionary.db"

#define N 32

#define R 1		//user - register
#define L 2		//user - login
#define Q 3		//user - query
#define H 4 	//user - history

#define SUPER 100 //flag for super user
#define NORMAL 10 //flag for normal user

//定义通信双方的结构体
typedef struct 
{
	int type;//动作的类型
	char name[N];
	char data[256];
	int flag;
}MSG;
